%%%==============================================================================================
%                  Draw the PDR BOXPLOT
%
%
% This file can draw boxplot for PRKS/RIDB/CMAC
% For Chuan, run PreparePdrMatFiles.m
clc
close all
clear all

% This .mat file contains 4 column vectors: pdr70, pdr80, pdr90, pdr95.
% Each column vector contains pdr samples for each link.
load pdr_samples.mat


results = {0};
results{1} = pdr70 * 100;
results{2} = pdr80 * 100;
results{3} = pdr90 * 100;
results{4} = pdr95 * 100;
group = zeros(0);
dataDisp = zeros(0);
for i = 1 : size(results, 2)
    group = [group ; ones(size(results{i})) + i - 1];
    dataDisp = [dataDisp ; results{i}];
end
figure1 = figure;

handler=boxplot(dataDisp, group, 'notch', 'on');hold on;
xlabel('PDR requirement(%)', 'FontSize', 40);
ylabel('PDR(%)', 'FontSize', 40);
set(gca,'xtick',[1 2 3 4],'xticklabel',{'70','80','90','95'},'fontsize',40);
set(gca,'fontsize',40);
saveas (gcf, 'temp.fig');
maximize ();



